- @no_container = true
- page_title "标签"
= render "projects/commits/head"

%div{ class: container_class }
  .top-area
    .nav-text
      标签用于标识重要的历史版本

    .nav-controls
      - if can? current_user, :push_code, @project
        = link_to new_namespace_project_tag_path(@project.namespace, @project), class: 'btn btn-create new-tag-btn' do
          新建标签
      .dropdown.inline
        %button.dropdown-toggle.btn{ type: 'button', data: { toggle: 'dropdown'} }
          %span.light= @sort.humanize
          %b.caret
        %ul.dropdown-menu.dropdown-menu-align-right
          %li
            = link_to namespace_project_tags_path(sort: nil) do
              名称
            = link_to namespace_project_tags_path(sort: sort_value_recently_updated) do
              = sort_title_recently_updated
            = link_to namespace_project_tags_path(sort: sort_value_oldest_updated) do
              = sort_title_oldest_updated

  .tags
    - if @tags.any?
      %ul.content-list
        = render partial: 'tag', collection: @tags

      = paginate @tags, theme: 'gitlab'

    - else
      .nothing-here-block
        版本库没有标签。
        %br
        %small
          使用 git tag 命令增加标签：
          %br
          %span.monospace git tag -a v1.4 -m 'version 1.4'
